<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
	<title>Search Resident</title>
	<link rel="stylesheet" href="<?php echo base_url();?>application/development-bundle/themes/swanky-purse/jquery.ui.all.css">
	<link rel="stylesheet" href="<?php echo base_url();?>application/development-bundle/demos/demos.css">
	<link rel="stylesheet" href="<?php echo base_url();?>application/css/style.css">
	<script src="<?php echo base_url();?>application/development-bundle/jquery-1.4.4.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.accordion.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.tabs.js"></script>
	<script src="<?php echo base_url();?>application/development-bundle/ui/jquery.ui.datepicker.js"></script>
		
	<script>
	$(function() {
		$( "#content" ).accordion({
			autoHeight: false,
			collapsible: true,
			active: false
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#navigation" ).accordion({
			autoHeight: false,
			collapsible: true
		});
	});
	</script>
	
	<script>
	$(function() {
		$( "#tabs" ).tabs();
	});
	</script>
	
	<script>
	function OnSubmitForm(){
		if(document.pressed == "Search Resident"){
			if(document.searchform.student_number.value!=""){
				document.searchform.action ="<?php echo base_url();?>index.php/residentController/loadSearchResidentView/";
				return true;
			}else{
				alert("Please enter student number!");
				return false;
			}
		}else if(document.pressed == "Back to Main"){
			document.searchform.action ="<?php echo base_url();?>index.php/adminPageController/";
			return true;
		}
	}
	</script>
	
</head>

<body>

<div class="demo">
	
	<div id="header"><h1>ACCI eXtreme Information System</h1></div>
	
	<div id="tabs">
	
		<ul>
			<li><a href="#tabs-1">Home</a></li>
			<li><a href="#tabs-2">Contact</a></li>
			<li><a href="#tabs-3">Developer</a></li>
		</ul>
		
		<div id="tabs-1">
		
			<table>
			<tr>
				<td>
					<h3>Search a Resident</h3>
					<div id="content">
						
						<h3><a href="#section1">Current Residents</a></h3>
						<div>
							Resident's List
						</div>
						
						<h3><a href="#section1">Search</a></h3>
						<form name="searchform" method="post" onSubmit="return OnSubmitForm();">
						<table class="centeredtable">
								<tr><td width="120px"></td><td width="300px"></td></tr>
								<tr><td>Student Number:</td><td><input type="text" class="longobject" name="student_number"/></td></tr>
						</table>
						<br/>
						<input type="reset" value="Reset" class="shortobject"/>
						<input type="submit" value="Search Resident" class="shortobject" onClick="document.pressed=this.value"/>
						<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
						</form>
						
					</div><!-- End content -->
				</td>
				
				<td>
					<div id="navigation">
					
						<h3><a href="#section1">Residents</a></h3>
						<div>
							Functionalities:<br/>
							<ul>
								<li><?php echo anchor('residentController/loadAddResidentView/','Add a Resident')?><br/></li>
								<li><?php echo anchor('residentController/loadResidentToSearchView/','Search a Resident')?><br/></li>
							</ul>
						</div>
						
						<h3><a href="#section2">Reports</a></h3>
						<div>
							Functionalities:<br/>
							<ul>
								<li><?php echo anchor('reportController/loadView/','Accomodation Tally')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Vacancy Tally')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per Classification')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per College')?><br/></li>
								<li><?php echo anchor('reportController/loadView/','Tally per Regional Distribution')?><br/></li>
							</ul>
						</div>
						
					</div><!-- End navigation -->
				</td>
			</tr>
			</table>
			
		</div><!-- End tabs-1 -->
		
		<div id="tabs-2"><p>Morbi tincidunt</p></div><!-- End tabs-2 -->
		
		<div id="tabs-3"><p>Mauris eleifend</p></div><!-- End tabs-3 -->
		
	</div><!-- End tabs -->
					
</div><!-- End demo -->

</body>
</html>
